<html>
 <head>
  <link href="./leetcode-problem.css" rel="stylesheet" type="text/css">
 </head>
 <body>
  <div class="question_difficulty">
   难度：Easy
  </div>
  <div>
   <h1 class="question_title">
    941. Sort Array By Parity
   </h1>
   <p>
    Given an array
    <code>
     A
    </code>
    of non-negative integers, return an array consisting of all the even elements of
    <code>
     A
    </code>
    , followed by all the odd elements of
    <code>
     A
    </code>
    .
   </p>
   <p>
    You may return any answer array that satisfies this condition.
   </p>
   <p>
    &nbsp;
   </p>
   <div>
    <p>
     <strong>
      Example 1:
     </strong>
    </p>
    <pre>
<strong>Input: </strong><span id="example-input-1-1">[3,1,2,4]</span>
<strong>Output: </strong><span id="example-output-1">[2,4,3,1]</span>
The outputs [4,2,3,1], [2,4,1,3], and [4,2,1,3] would also be accepted.
</pre>
    <p>
     &nbsp;
    </p>
    <p>
     <strong>
      Note:
     </strong>
    </p>
    <ol>
     <li>
      <code>
       1 &lt;= A.length &lt;= 5000
      </code>
     </li>
     <li>
      <code>
       0 &lt;= A[i] &lt;= 5000
      </code>
     </li>
    </ol>
   </div>
  </div>
  <div>
   <h1 class="question_title">
    941. 按奇偶排序数组
   </h1>
   <p>
    给定一个非负整数数组
    <code>
     A
    </code>
    ，返回一个由
    <code>
     A
    </code>
    的所有偶数元素组成的数组，后面跟
    <code>
     A
    </code>
    的所有奇数元素。
   </p>
   <p>
    你可以返回满足此条件的任何数组作为答案。
   </p>
   <p>
    &nbsp;
   </p>
   <p>
    <strong>
     示例：
    </strong>
   </p>
   <pre><strong>输入：</strong>[3,1,2,4]
<strong>输出：</strong>[2,4,3,1]
输出 [4,2,3,1]，[2,4,1,3] 和 [4,2,1,3] 也会被接受。
</pre>
   <p>
    &nbsp;
   </p>
   <p>
    <strong>
     提示：
    </strong>
   </p>
   <ol>
    <li>
     <code>
      1 &lt;= A.length &lt;= 5000
     </code>
    </li>
    <li>
     <code>
      0 &lt;= A[i] &lt;= 5000
     </code>
    </li>
   </ol>
  </div>
 </body>
</html>